package com.developer.t24haber.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.developer.t24haber.R;
import com.developer.t24haber.activity.NewsActivity;

public class NewsFragment extends Fragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_news, container, false);
		WebView webView = (WebView) view.findViewById(R.id.wv_page);
		String newsLink = getArguments().getString(NewsActivity.EXTRA_NEWS_LINK);
		webView.setWebViewClient(new WebViewClient());
		webView.loadUrl(newsLink);
		return view;
	}

}
